#!/usr/bin/env bash

# Filename     :	cfssl_cmd.sh
# Last modified:	2022-10-17 12:12
# Version      :
# Author       : jack.zang
# Email        : jack.zang@aishangwei.net
# Description  :
# 使用方法：export USER="public";PASS="Asw123456" && source <(curl -sL https://gitee.com/jack_zang/kubernetes/raw/master/install/binary_1.24/cfssl_cmd.sh)
# ******************************************************


dnf install wget -y
#wget https://github.com/cloudflare/cfssl/releases/download/v1.6.1/cfssl_1.6.1_linux_amd64
#wget https://github.com/cloudflare/cfssl/releases/download/v1.6.1/cfssljson_1.6.1_linux_amd64
#wget https://github.com/cloudflare/cfssl/releases/download/v1.6.1/cfssl-certinfo_1.6.1_linux_amd64
curl -fL# -u $USER:$PASS -o cfssl_1.6.1_linux_amd64 https://files.aishangwei.net/files/cfssl/cfssl_1.6.1_linux_amd64
curl -fL# -u $USER:$PASS -o cfssljson_1.6.1_linux_amd64 https://files.aishangwei.net/files/cfssl/cfssljson_1.6.1_linux_amd64
curl -fL# -u $USER:$PASS -o cfssl-certinfo_1.6.1_linux_amd64 https://files.aishangwei.net/files/cfssl/cfssl-certinfo_1.6.1_linux_amd64

mv cfssl_1.6.1_linux_amd64 /usr/bin/cfssl
mv cfssljson_1.6.1_linux_amd64 /usr/bin/cfssljson
mv cfssl-certinfo_1.6.1_linux_amd64 /usr/bin/cfssl-certinfo
chmod +x /usr/bin/cfssl*


